package com.seadragon.app.dms.model;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.JoinColumn;
import javax.persistence.MappedSuperclass;
import javax.persistence.OneToOne;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@MappedSuperclass
public abstract class Resident extends Person implements Serializable{
	private static final long serialVersionUID = 2014130007779786010L;

	@Column(name="GENDER")
	private String gender;

	@Column(name="DATE_OF_BIRTH")
	@Temporal(TemporalType.DATE)
	private Date dateOfBirth;

	@Column(name="LANGUAGE")
	private String language;

	@OneToOne(cascade=CascadeType.PERSIST)
	@JoinColumn(name="RESIDENT_ADDRESS_ID")
	private Address residentAddress;

	public Resident() {
		super();
	}

	public String getFirstName() {
		return firstName;
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	public String getLastName() {
		return lastName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	public String getGender() {
		return gender;
	}

	public void setGender(String gender) {
		this.gender = gender;
	}

	public Date getDateOfBirth() {
		return dateOfBirth;
	}

	public void setDateOfBirth(Date dateOfBirth) {
		this.dateOfBirth = dateOfBirth;
	}

	public String getLanguage() {
		return language;
	}

	public void setLanguage(String language) {
		this.language = language;
	}

	public Address getResidentAddress() {
		return residentAddress;
	}

	public void setResidentAddress(Address residentAddress) {
		this.residentAddress = residentAddress;
	}
}